package com.scs.application.modules.finance.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.FlowEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
/**
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "扎账单表")
@TableName("finance_account_check")
public class AccountCheck extends FlowEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "本次扎帐日期",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    @DateTimeFormat(pattern="yyyy-MM-dd")//页面写入数据库时格式化
    @JSONField(format="yyyy-MM-dd")//数据库导出页面时json格式化
    private Date busDate;

    @EntityFieldAnnotation(
            text = "扎帐人",
            length = "20",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String busUser;

    @EntityFieldAnnotation(
            text = "扎帐人编码",
            length = "20",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String busUserCode;

    @EntityFieldAnnotation(
            text = "上次扎帐日期",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    @DateTimeFormat(pattern="yyyy-MM-dd")//页面写入数据库时格式化
    @JSONField(format="yyyy-MM-dd")//数据库导出页面时json格式化
    private Date busDateCurrent;

    @EntityFieldAnnotation(
            text = "备注",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;


    @EntityFieldAnnotation(
            text = "DeptId",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String deptId;

    @EntityFieldAnnotation(
            text = "科室名称",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String deptName;

    @EntityFieldAnnotation(
            text = "配送出库金额",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double amountOut;

    @EntityFieldAnnotation(
            text = "消耗出库金额",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double amountUse;

    @EntityFieldAnnotation(
            text = "病人计费金额",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double amountPatient;

    @EntityFieldAnnotation(
            text = "已扎帐配送出库金额",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double amountOutCheck;

    @EntityFieldAnnotation(
            text = "已扎帐消耗出库金额",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double amountUseCheck;

    @EntityFieldAnnotation(
            text = "已扎帐病人计费金额",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double amountPatientCheck;

    @EntityFieldAnnotation(
            text = "配送出单据数量",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double sumOut;

    @EntityFieldAnnotation(
            text = "消耗出库单据数量",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double sumUse;

    @EntityFieldAnnotation(
            text = "病人计费单据数量",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double sumPatient;

    @EntityFieldAnnotation(
            text = "已扎帐配送单据数量",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double sumOutCheck;

    @EntityFieldAnnotation(
            text = "已扎帐消耗单据数量",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double sumUseCheck;

    @EntityFieldAnnotation(
            text = "已扎帐病人单据数量",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double sumPatientCheck;

}
